Generate Certificate Signing Request
The /files/tls/<id>/certificate/generate URL generates a new certificate signing request (CSR) for the specific TLS context. The generated CSR is returned in the response.
URL
/api/v1/files/tls/<id>/certificate/request
HTTP Method
POST
Supported Request JSON attributes
|
Parameter |
Type |
Description |
|---|---|---|
|
subjectName |
String |
Subject name [CN] of the generated certificate. Default = <empty>. |
|
organizationalUnit |
String |
Organizational unit [OU] of the generated certificate. Default = <empty>. |
|
companyName |
String |
Company name [O] of the generated certificate. Default = <empty>. |
|
localityName |
String |
Locality of city name [L] of the generated certificate. Default = <empty>. |
|
state |
String |
State [ST] of the generated certificate. Default = <empty>. |
|
countryCode |
String |
Country code [C] of the generated certificate. Default = <empty>. |
|
signatureAlgorithm |
String sha1 | sha256 | sha512 |
Signature algorithm to be used for the certificate signing request; default=sha1 |
Supported Responses
| ■ | 200 OK |
| ■ | 400 Bad request – provided certificate file is incorrect (e.g. it is not in PEM format) |
| ■ | 409 Conflict – private key can’t be loaded due to current device state (e.g. redundant board is synchronizing). |
Example
| ■ | Request: |
POST /api/v1/files/tls/2/certificate/request HTTP/1.1
Host: 10.4.219.229
Content-Type: application/json
{
"subjectName": "lync-gw.company.com"
}
| ■ | Response: |
HTTP/1.1 200 OK Content-Type: application/octet-stream -----BEGIN CERTIFICATE REQUEST----- MIIBZDCBzgIBADAlMRUwEwYDVQQDDAxGQTE2M0VGM0IxREUxDDAKBgNVBAoMA0FD TDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5sVNvmrwFaPkJUE2zA8TSR78 ... +pa+sF+F+N9HPQ0hqsvBtNJTL5dOEICBYcqYTx5+zqi38WAwHml4VGqduBofZWB2 pEqNck3yG/k8Hmm2pbTUFEE5XpVc6Lcu -----END CERTIFICATE REQUEST-----